home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
print
/
proff.zip
/
PROFFMAN.PRF
< prev
next >
Wrap
Text File
|
1988-02-13
|
48KB
|
1,567 lines
.! Proff user's manual
.! Feb. 1984 by Ozan S. Yigit
.!
.! Edited by Steven Tress and Terry Lim
.! vers. 1.0
.!
.! ----------- macros ----------
.! sect - produce a bold section header and
.! enter a contents line. First parameter
.! is indent level for contents line.
.define sect
.sp
.cl $1 $2 $3 $4 $5 $6 $7
.bd
$2 $3 $4 $5 $6 $7
.en
.! -----------------------------
.define note
.sp
.ce
NOTE
.sp
.fi
.in +5
.rm -5
.en
.define endnote
.sp
.nf
.in -5
.rm +5
.en
.! -----------------------------
.! Macros to create a point-form lists.
.! Note the use of number registers within
.! the macros. See section 5.
.!
.define list
.nr a $1
.in +$1
.en
.define item
.sp
.ti -@na
$1
.en
.define nolist
.in -@na
.sp
.en
.! -----------------------------
.ce 100
.st 8
PROFF User's Guide
.sp
Version 1.0
.ce 0
.nf
.in +25
.sp 15
*** *******
*** *********
** **
** **
*********
*******
**
**
**
******
****
.in -25
.fi
.ce 100
.st -8
Ozan S. Yigit & Steven Tress
March 1984
.ce 0
.bp 1
.he /1.0/Proff User's Guide/#/
.ap
.fi
.ju
.sect 0 1.0 Introduction
This manual describes PROFF, a formatter based on the FORMAT utility
presented in
.ul
Software Tools.
PROFF was produced to provide a powerful formatter that can be used under
a variety of microcomputers, thus providing a consistent formatting tool
across environments. PROFF can be used to format memos, reports, form letters
and
documents such as this manual. It can also be configured to mimic
other formatting
systems of similar nature.
This document itself was produced with PROFF, using most of its advanced features.
PROFF took care of such things as auto-paragraphing and the production of
the Table of Contents as the manual was being formatted.
PROFF was developed under a Digital Equipment Corporation Rainbow 100,
using Mark Williams C Compiler for portability reasons. PROFF is
available under VAX/VMS operating system. PROFF implementations for
IBM PC and APPLE ][ microcomputers are also underway.
.st -14
Rainbow, VAX/VMS are trademarks of Digital Equipment Corporation.
.br
Mark Williams C Compiler is a trademark of Mark Williams Company.
.br
IBM is a registered trademark of International Business Machines Inc.
.br
APPLE is a trademark of Apple Computer Inc.
.br
UNIX is a trademark of Bell Laboratories.
.bp
.cl
.sect 0 2.0 General Description
.cl
.sect 1 2.1 The Input
The text that is to be formatted by PROFF is typed into an input file
using any text editor. This file contains the text to be formatted
as well as PROFF commands.
Each line in the input file is either a command line or a text line. A
command line is a line that begins with a period ("."). All other lines are
text lines. The command lines are not printed - they tell PROFF how you want
it to format the text that follows. Appendix A summarizes all of the PROFF
commands for a quick reference.
.sect 2 2.1.1 Text
Text can be entered into the input file in any format. PROFF removes all extra
blanks and tabs between words when operating in fill mode. This means you do
not have to worry about how many words you put on a line, and you can break
lines wherever it is convenient to your typing. Note however, that you cannot
break a word between two lines.
Blanks and tabs at the beginning of a line are not removed. This is useful
for producing special tables and performing special types of indentation.
Thus, normal text lines should not have any leading tabs or blanks.
.sect 2 2.1.2 Commands
A command is a line that starts with a period. Immediately following the
period is a command name. Some commands accept a numeric quantity or a
character string parameter, which must be separated from the command name
by a space or a comma. For example, an indent command might appear as follows:
.save
.in +5
.nf
.nj
.sp
|
|It is to do nothing that the elect exists.
|.in 5
|- Oscar Wilde
|
.restore
Assuming that the left margin was at column 1, PROFF would produce the
following:
.save
.in +5
.nf
.nj
.sp
.need 4
|
|It is to do nothing that the elect exists.
| - Oscar Wilde
|
.restore
.sp
(In the examples above, as in those following, the vertical line indicates
the left edge of input or the left edge of the printed page).
The number following the command may be preceeded by a "+" or "-" sign.
This plus or minus sign indicates an addition or subtraction of the number
to or from the current value for the command. for example, the text:
.sp
.save
.in +5
.nf
.nj
.need 11
|
|Nothing to do but work,
|.in +3
|Nothing to eat but food,
|.in -3
|Nothing to wear but clothes
|.in +3
|To keep one from going nude.
|.in +7
|-Benjamin King
|
.in -5
.sp
will produce as output:
.sp
.in +5
.need 6
|
|Nothing to do but work,
| Nothing to eat but food,
|Nothing to wear but clothes
| To keep one from going nude.
| -Benjamin King
|
.restore
If a number is not supplied with a command that requires a number, PROFF
will use a default value. The defaults for each command are summarized in
Appendix A.
.cl
.sect 1 2.2 The Output
The main functions performed by PROFF are
.ul
filling
and
.ul
justifying.
A line is
filled by packing as many words onto it as will fit. The line is justified
by spacing words evenly between the left and right margins. When PROFF starts,
it assumes that the text is to be filled and justified. Of course, when fill
and justify are not needed (as in the case of a letter or a table), there are
commands to turn these features off, and back on again, as necessary.
When PROFF is in fill mode, it normally strips out extra spaces and tabs
between words.
Many PROFF commands cause a
.ul
break
to occur in the output. This means that the line currently being filled is
immediately output. Any following text goes into a new output line.
.cl
.sect 1 2.3 Executing PROFF
Once a text file is ready for formatting, PROFF is started by typing
the program name, various options, name of the input file and the name
of the output file. For example the command
.sp
.in +5
A> proff -po5 proffman.prf proff.man
.sp
.in -5
would produce this document as proff.man, from an input file proffman.prf,
shifted right by 5 spaces.
(The symbol "A>" is CP/M system prompt).
.cl
.sect 1 2.4 Bibliographic Notes
PROFF was produced by re-writing the Software Tools Formatter FORMAT.
Some of the ideas are from Freshwater Institute RUNOFF, NROFF,
University of Waterloo SCRIPT
and other formatters of similar nature. The underlying ideas of the
mentioned above formatters may be found in
.ul
Software Tools
by B.W. Kernighan and P.J. Plauger. 1976. (Addison-Wesley, Reading, Mass.).
.cl
.sect 1 2.5 References and Readings
.nf
.nap
.sp
Brian W. Kernighan and P. J. Plauger,
.ul
Software Tools
Addison-Wesley (1976)
.sp
R. Furuta, J. Scofield and A. Shaw,
.ul
Document Formatting Systems:
.ul
Survey, Concepts, and issues
ACM Computing Surveys, Sept. 1982, Pp. 417
.sp
Mark Stuart Brader,
.ul
An Incremental Text Formatter
Department of Computer Science
University of Waterloo, CS-81-12
.bp
.fi
.ap
.cl
.sect 0 3.0 Command Descriptions
This section describes PROFF commands. Commands specify how the program is
to process the text lines in the input file. Lines in the input file that
begin with a period (or the control character selected by the user)
immediately followed by a command name are commands. Any line that begins
with a period and followed by a _# or _! is a comment line and is ignored
by PROFF - this allows you to put information in the file that will be neither
processed nor output by PROFF.
As described earlier, some of the commands can be followed by "parameters".
Parameters are used in executing a command; for example, in the command
".sp 3", the parameter "3" tells the formatter to insert 3 blank lines into
the document. The following conventions are used in describing the parameters:
.sp
.in +5
.ti -2
o Parameters surrounded by square b